import { Component } from 'react';
import { Switch, Route, HashRouter } from 'react-router-dom';
import Login from './views/account'
import Index from './views/layout/Index'
import PrivateRouter from './components/PrivateRouter'
import  {Provider} from 'react-redux'
import store from '@/store/index.js'
// import  from ''


class App extends Component {
  constructor(props) {
    super(props);
    this.state = {  }
  }
  render() { 
    return ( 
      // 尤其注意 这里的路由和router下面的路由直接的关联
      <Provider store={store} >
        <HashRouter>
          <Switch>
            <Route component={Login} exact path="/"/>
            <PrivateRouter component={Index}  path="/index"/>
          </Switch>
        </HashRouter> 
      </Provider>
     );
  }
}

export default App;
